CREATE FUNCTION TO CHANGE TXT TO CSV
convert txt to csv function
BATCH 1
set path of main folder
list all participant folders
list all nested folders
loop through each participant folder to find nested folders
initialise a list to hold CSV file paths
loop through each participant folder
read all csv files into a list of data frames
Change subject_pair to a character, so it is compatible with the dataframe merge later
Create csv of merged, raw data
BATCH 2
set path of main folder
list all participant folders
list all nested folders
loop through each participant folder to find nested folders
initialise a list to hold CSV file paths
loop through each participant folder
read all csv files into a list of data frames
Create csv of merged, raw data
BATCH 3
set path of main folder
list all participant folders
list all nested folders
loop through each participant folder to find nested folders
initialise a list to hold CSV file paths
loop through each participant folder
read all csv files into a list of data frames
Create csv of merged, raw data
BATCH 4
set path of main folder
list all participant folders
list all nested folders
loop through each participant folder to find nested folders
initialise a list to hold CSV file paths
loop through each participant folder
read all csv files into a list of data frames
Create csv of merged, raw data
BATCH 5
set path of main folder
list all participant folders
list all nested folders
loop through each participant folder to find nested folders
initialise a list to hold CSV file paths
loop through each participant folder
read all csv files into a list of data frames
Create csv of merged, raw data
BIG MERGE
Now merge the datasets together to create the master dataset
Create csv of merged, raw data